﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
using System.Security.Cryptography;
using System.Text.RegularExpressions;
using System.Globalization;

namespace Settings
{
    /// <summary>
    /// Định nghĩa các setting chung của cả solution
    /// </summary>
    public class AppSetting
    {
        /// <summary>
        /// Định nghĩa xâu kết nối được lấy từ trong file config
        /// </summary>
        public static string ConnectionString
        {
            get
            {
                return ConfigurationManager.ConnectionStrings["MSSQLConnectionString"].ConnectionString;
            }
        }

        public static IFormatProvider DateTimeFormat
        {
            get
            {
                return CultureInfo.CreateSpecificCulture(ConfigurationManager.AppSettings["CultureInfo"]);
            }
        }

        public static string PatternFileUploadModel
        {
            get
            {
                return ConfigurationManager.AppSettings["PatternFileUploadModel"];
            }
        }

        public static string PatternFileUploadProductCate
        {
            get
            {
                return ConfigurationManager.AppSettings["PatternFileUploadProductCate"];
            }
        }

        public static string PatternFileUploadRegisterWarranty1
        {
            get
            {
                return ConfigurationManager.AppSettings["PatternFileUploadRegisterWarranty1"];
            }
        }

        public static string PatternFileUploadRegisterWarranty2
        {
            get
            {
                return ConfigurationManager.AppSettings["PatternFileUploadRegisterWarranty2"];
            }
        }

        public static string PatternFileImportPhoneList
        {
            get
            {
                return ConfigurationManager.AppSettings["PatternFileImportPhoneList"];
            }
        }

        public static string PatternFileImportAgency
        {
            get
            {
                return ConfigurationManager.AppSettings["PatternFileImportAgency"];
            }
        }

        public static string DefaultSenderName
        {
            get
            {
                return ConfigurationManager.AppSettings["DefaultSenderName"];
            }
        }

        public static string DefaultMtType
        {
            get
            {
                return ConfigurationManager.AppSettings["DefaultMtType"];
            }
        }
    }
}
